package com.vvv.method;

import java.util.concurrent.locks.LockSupport;

/**
 * @author vvv
 * @date 2023-11-08 13 03
 * discription
 */
public class LockSupportDemo01 {
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(() -> {
            System.out.println("t1");
            LockSupport.park();
        });

        t1.start();
        Thread.sleep(1000);
        System.out.println(t1.interrupted());
        LockSupport.unpark(t1);
        System.out.println(t1.isInterrupted());
        System.out.println(t1.interrupted());
    }
}
